﻿using System.Configuration;
using System.Linq;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Configuration.Design.ViewModel;
using Microsoft.Practices.Unity;

namespace EntLibContrib.Query.Configuration.Design.ViewModel
{
#pragma warning disable 1591
	/// <summary>
	/// This class supports block-specific configuration design-time and is not
	/// intended to be used directly from your code.
	/// </summary>
	public class ParameterSetDataViewModel : CollectionElementViewModel
	{
        public ParameterSetDataViewModel(ElementCollectionViewModel containingCollection, ConfigurationElement thisElement)
            :base(containingCollection, thisElement)
        {
        }

        protected override object CreateBindable()
        {
            return new HierarchicalLayout(
                this,
                this.ChildElement("Parameters") != null ? this.ChildElement("Parameters").ChildElements : new ElementViewModel[0],
                1);
        }
    }
}
